@import url("https://fonts.googleapis.com/css2?family=Roboto&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Raleway&family=Roboto:wght@500;700&display=swap");

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

:root {
  --primary: #045863;
  --bg: #e7e7e7;
  --projects-gap: 30px;
}

html {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

*,
*::after,
*::before {
  box-sizing: inherit;
}

body {
  color: var(--primary);
  font-family: "Roboto", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 120%;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1600px;
  padding: 0 10px;
  margin: 0 auto;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.header {
  margin-bottom: 50px;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 20px;
}

.title {
  font-size: 4em;
  margin-bottom: 70px;
  font-family: "Raleway", sans-serif;
  line-height: 120%;
}
.main {
  flex: 1;
  margin-bottom: 50px;
}

.projects {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.projects__item {
  position: relative;
  background-color: #045863;

  color: #fff;
  background-size: cover;
  background-position: center;
  cursor: pointer;
}

.projects__item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  transition: background-color 0.3s;
}

.projects__item:hover::before {
  background-color: rgba(0, 0, 0, 0.2);
}

.h16by9 {
  padding-top: 56.25%;
}

.projects__item:nth-of-type(4) {
  grid-column-start: span 2;
  padding-top: calc(56.25% / 2);
}

.projects__item:nth-of-type(4) .projects__item-title {
  font-size: 3em;
}

.projects__item:nth-of-type(7) {
  grid-column-end: span 2;
  padding-top: calc(56.25% / 2);
}

.projects__item:nth-of-type(7) .projects__item-title {
  font-size: 2em;
}

.projects__item-title {
  position: absolute;
  padding-right: 5px;
  font-size: 18px;
  font-family: "Raleway", sans-serif;
  line-height: 120%;
  left: 5%;
  bottom: 10%;
}

.projects__item:nth-of-type(1) {
  background-image: url("./image/project-1.jpg");
}
.projects__item:nth-of-type(2) {
  background-image: url("./image/project-2.jpg");
}
.projects__item:nth-of-type(3) {
  background-image: url("./image/project-3.jpg");
}
.projects__item:nth-of-type(4) {
  background-image: url("./image/project-4.jpg");
}
.projects__item:nth-of-type(5) {
  background-image: url("./image/project-5.jpg");
}
.projects__item:nth-of-type(6) {
  background-image: url("./image/project-6.jpg");
}
.projects__item:nth-of-type(7) {
  background-image: url("./image/project-7.jpg");
}

.footer {
  margin: 0 auto;
  text-align: center;
  padding-bottom: 30px;
}

.footer__social {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.footer__social-img {
  height: 36px;
  width: 36px;
}

.footer__contacts {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
  gap: 30px;
}

@media (max-width: 1110px) {
  .title {
    font-size: 2.5em;
  }
  .projects__item:nth-of-type(4) .projects__item-title {
    font-size: 1em;
  }

  .projects__item:nth-of-type(7) .projects__item-title {
    font-size: 1em;
  }
  .projects {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .projects__item:nth-of-type(4) {
    grid-column-start: span 1;
    padding-top: 56.25%;
  }

  .projects__item:nth-of-type(7) {
    grid-column-start: span 1;
    padding-top: 56.25%;
  }
}

@media (max-width: 680px) {
  .header {
    margin-bottom: 20px;
  }

  .main {
    margin-bottom: 20px;
  }
  .nav {
    flex-direction: column;
  }

  .nav__menu {
    flex-direction: column;
  }

  .title {
    margin-bottom: 30px;
  }

  .projects {
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
  }
}

@media (max-width: 680px) {
  .footer__contacts {
    flex-direction: column;
  }
}
